package com.cq.mapper;

import com.cq.pojo.User;
import com.cq.pojo.User_meeting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 悠久的苍穹
 * @Date: 2021/1/22 15:54
 * @Description: 用户数据层
 * @Version: 1.0
 */
@Mapper
@Repository
public interface UserMapper {
    User findUserByOpenId(@Param("openid") String openid, @Param("nickname") String nickname);

    int addUser(User user1);

    int updateUser(User user);

    List<User> findUsers(@Param("page") int page, @Param("limit") int limit);

    User findUserByUUid(@Param("uuid") String uuid);

    int updateUserAuth(User user);

    void deleteUserById(@Param("s1") String s1);

    int getCount();

    User_meeting findUserByUUidAndMeetingId(@Param("userId") String userId, @Param("meetingId") String meetingId);

    void addUserMeeting(User_meeting user_meeting);


    int isSign(@Param("meetingId") String meetingId, @Param("uuid") String uuid);

    void sign(@Param("meetingId") String meetingId, @Param("uuid") String uuid);

    void updateJoin(@Param("userId") String userId, @Param("meetingId") String meetingId);

    List<User> findUserSign(@Param("sign") String sign, @Param("meetingId") String meetingId);

    void updateEmail(@Param("uuid") String uuid, @Param("email") String email);
}
